import VueRouter from 'vue-router'

import HomeContainer from './compoents/tabbar/HomeContainer.vue'
import MemberContainer from './compoents/tabbar/MemberContainer.vue'
import ShopcarContainer from './compoents/tabbar/ShopcarContainer.vue'
import SearchContainer from './compoents/tabbar/SearchContainer.vue'

import NewsList from './compoents/news/NewsList.vue'
import NewsInfo from './compoents/news/NewsInfo.vue'

import PhotoList from './compoents/photo/PhotoList.vue'
import PhotoInfo from './compoents/photo/PhotoInfo.vue'

import GoodsList from './compoents/goods/GoodsList.vue'
import GoodsInfo from './compoents/goods/GoodsInfo.vue'
import GoodsDesc from './compoents/goods/GoodsDesc.vue'
import GoodsComment from './compoents/goods/GoodsComment.vue'

var router = new VueRouter({
    routes: [
        {path:'/',redirect:'/home'},
        {path:'/home',component:HomeContainer},
        {path:'/member',component:MemberContainer},
        {path:'/shopcar',component:ShopcarContainer},
        {path:'/search',component:SearchContainer},
        {path:'/home/newslist',component:NewsList},
        {path:'/home/newsinfo/:id',component:NewsInfo},
        {path:'/home/photolist',component:PhotoList},
        {path:'/home/photoinfo/:id',component:PhotoInfo},
        {path:'/home/goodslist',component:GoodsList},
        {path:'/home/goodsinfo/:id',component:GoodsInfo,name:'goodsinfo'},
        {path:'/home/goodsdesc/:id',component:GoodsDesc,name:'goodsdesc'},
        {path:'/home/goodscomment/:id',component:GoodsComment,name:'goodscomment'}
    ],
    linkActiveClass: 'mui-active'
})

export default router